package com.trkj.pojo;

import java.io.Serializable;
import javax.persistence.*;

import com.alibaba.fastjson.annotation.JSONField;

import java.math.BigDecimal;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the BONUS_PENALTYPE database table.
 * 
 */
@Entity
@Table(name="BONUS_PENALTYPE")
@NamedQuery(name="BonusPenaltype.findAll", query="SELECT b FROM BonusPenaltype b")
public class BonusPenaltype implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@SequenceGenerator(name="BONUS_PENALTYPE_BPTID_GENERATOR", sequenceName="HR")
	@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="BONUS_PENALTYPE_BPTID_GENERATOR")
	@Column(name="BPT_ID")
	private long bptId;

	@Column(name="BPT_FOUNDDATE")
	private Timestamp bptFounddate;

	@Column(name="BPT_NAME")
	private String bptName;

	@Column(name="BPT_PERSON")
	private String bptPerson;

	@Column(name="BPT_TYPE")
	private BigDecimal bptType;

	@Column(name="BPT_UPDATETIME")
	private Timestamp bptUpdatetime;

	//bi-directional many-to-one association to BonusAdministration
	@OneToMany(mappedBy="bonusPenaltype")
	@JSONField(serialize=false)
	private List<BonusAdministration> bonusAdministrations;

	public BonusPenaltype() {
	}

	public long getBptId() {
		return this.bptId;
	}

	public void setBptId(long bptId) {
		this.bptId = bptId;
	}

	public Timestamp getBptFounddate() {
		return this.bptFounddate;
	}

	public void setBptFounddate(Timestamp bptFounddate) {
		this.bptFounddate = bptFounddate;
	}

	public String getBptName() {
		return this.bptName;
	}

	public void setBptName(String bptName) {
		this.bptName = bptName;
	}

	public String getBptPerson() {
		return this.bptPerson;
	}

	public void setBptPerson(String bptPerson) {
		this.bptPerson = bptPerson;
	}

	public BigDecimal getBptType() {
		return this.bptType;
	}

	public void setBptType(BigDecimal bptType) {
		this.bptType = bptType;
	}

	public Timestamp getBptUpdatetime() {
		return this.bptUpdatetime;
	}

	public void setBptUpdatetime(Timestamp bptUpdatetime) {
		this.bptUpdatetime = bptUpdatetime;
	}

	public List<BonusAdministration> getBonusAdministrations() {
		return this.bonusAdministrations;
	}

	public void setBonusAdministrations(List<BonusAdministration> bonusAdministrations) {
		this.bonusAdministrations = bonusAdministrations;
	}

	public BonusAdministration addBonusAdministration(BonusAdministration bonusAdministration) {
		getBonusAdministrations().add(bonusAdministration);
		bonusAdministration.setBonusPenaltype(this);

		return bonusAdministration;
	}

	public BonusAdministration removeBonusAdministration(BonusAdministration bonusAdministration) {
		getBonusAdministrations().remove(bonusAdministration);
		bonusAdministration.setBonusPenaltype(null);

		return bonusAdministration;
	}

}